import request from '../utils/request'

export function fetchList(params: any) {
  return request({
    url: '/reminders/v1/list',
    method: 'get',
    params: params
  })
}

export function createReminder(data: any) {
  return request({
    url: '/reminders/v1/add',
    method: 'post',
    data: data
  })
}

export function deleteReminder(id: number) {
  return request({
    url: `/reminders/v1/delete/${id}`,
    method: 'delete'
  })
}

export function updateReminder(data: any) {
  return request({
    url: '/reminders/v1/update',
    method: 'put',
    data: data
  })
}

//根据ID查询提醒详情
export function getReminderByUser(id: number) {
  return request({
    url: `/reminders/v1/${id}`,
    method: 'get'
  })
}
